{% extends "base.html" %}

{% set page_title = topic_name + ' - ' + subtopic_name %}

{% block body %}
  <h1>{% block page_title %}{{ topic_name }}{% endblock %}</h1>

  <div id="nav_holder">
  <ul>
  {% block nav_elements %}
  <li><a class="home" href="{{ url('home') }}"><img src="/img/icon_undo_48_48.png" height="23px" width="23px" alt="Back">Topics</a></li>

  {% for pair in subpages %}
    {% set target = pair[0] %}
    {% set text = pair[1] %}

    <li>
    {% if subtopic_name == text %}
        <a class="active">{{ text }}</a>
    {% else %}
        <a href="{{ target }}">{{ text }}</a>
    {% endif %}
    </li>
  {% endfor %}

  {% endblock nav_elements %}
  </ul>
  </div>

  <div id="content">
  {% block content %}{% endblock %}
  </div>
  
{% endblock body %}

